home *** CD-ROM | disk | FTP | other *** search
- .Na "options"
- .Aa
- .Fu
- The complete list of \*L options.
- .Ih "options, list of"
- .Ih "\*L options, list of"
- .Sy
- .Si "<sybfront.h>"
- .Si "<sybdb.h>"
- .Co
- .Bl
- \f2dbsetopt()\f1 and \f2dbclropt()\f1 use the
- following constants, defined in \f2sybdb.h\f1, for setting and
- clearing options.
- .Ih "sybdb.h"
- All options are off by default.
- These options are available:
- .Bz
- .in +.375i
- .Pi DBPARSEONLY
- .Ih "DBPARSEONLY option"
- If this option is set, the \*S will only check the syntax of the query and return
- error messages to the host.
- Offsets will be returned if the DBOFFSET option
- is set and there are no errors.
- .Pi DBSHOWPLAN
- .Ih "DBSHOWPLAN option"
- If this option is set, the \*S will generate a description of the processing plan after
- compilation and continue executing the query.
- .Pi DBNOEXEC
- .Ih "DBNOEXEC option"
- If this option is set, the \*S will process the query through the compile step but the
- query will not be executed. This can be used in conjunction with
- .I DBSHOWPLAN.
- .Pi DBARITHABORT
- .Ih "DBARITHABORT option"
- .Ih "arithmetic exceptions"
- If this option is set, the \*S will abort a query when an arithmetic exception occurs during its execution.
- .mc |
- .Pi DBARITHIGNORE
- .Ih "DBARITHIGNORE option"
- If this option is set, the \*S will substitute null values for selected or updated values
- when an arithmetic exception occurs during query execution.
- The \*S will not return a warning message.
- If neither DBARITHABORT nor DBARITHIGNORE
- is set, \*S will substitute null values and print a warning
- message after the query has been executed.
- .Pi DBNOCOUNT
- .Ih "DBNOCOUNT option"
- This option causes \*S to stop sending back information about the number of
- rows affected by each SQL statement.
- The application can otherwise obtain this
- information by calling \f2DBCOUNT().\f1
- .Ih DBCOUNT
- .Pi DBTEXTSIZE
- .Ih "DBTEXTSIZE option"
- .Ih "text values, limiting the size of"
- .Ih "image values, limiting the size of"
- This option causes \*S to limit the size of returned text or image values.
- When setting this option, you supply a parameter which is the
- length, in bytes, of the longest text or image value that \*S
- should return.
- Note that, in programs that allow application users to make ad hoc queries,
- the user may override this option with the \*N SET TEXTSIZE
- command.
- To set a text limit that the user cannot override, use the DBTEXTLIMIT
- option instead.
- .mc
- .Pi DBOFFSET
- .Ih "DBOFFSET option"
- .Ih "\*N constructs, checking for"
- .Ih "offsets to \*N constructs"
- This option indicates where \*S should return offsets to certain constructs
- in the query. DBOFFSET takes a parameter that specifies the
- particular construct. The valid parameters for this option are
- ``select'', ``from'', ``table'', ``order'', ``compute'', ``statement'', ``procedure'', ``execute'', or ``param''.
- (Note that ``param'' refers to parameters of stored procedures.)
- Calls to routines such as \f2dbsetopt()\f1 can specify these
- option parameters in either lower or upper case.
- For the internal types that correspond to the offsets, see
- .I "dbgetoff()."
- Offsets are returned only if the batch contains no syntax errors.
- .Pi DBSTAT
- .Ih "DBSTAT option"
- .Ih "performance statistics"
- .Ih "statistics, performance"
- This option
- determines when performance statistics (CPU time, elapsed time, I/O, etc.)
- will be returned to the host after each query.
- DBSTAT takes one of two parameters:
- ``io'',
- for statistics about \*S internal I/O; and
- ``time'',
- for information about
- \*S's parsing, compilation, and execution times.
- These statistics are received by \*L in the form of informational
- messages, and application programs can access them through the
- user-supplied message handler.
- .Pi DBSTORPROCID
- .Ih "DBSTORPROCID option"
- .Ih "stored procedure"
- If this option is set, \*S will send the stored procedure id
- to the host before sending rows generated by the stored procedure.
- .Pi DBROWCOUNT
- .Ih "DBROWCOUNT option"
- .Ih "results rows, setting a maximum number"
- .Ih "rows, setting a maximum number"
- If this option is set, the \*S will return only a maximum specified number of regular rows
- for SELECT statements.
- This option does not limit the number of compute rows returned.
- .sp 0.5v
- DBROWCOUNT works somewhat differently from most options. It is always
- set on, never off. Setting
- DBROWCOUNT to 0
- sets it back to the default\(emthat is, to return all the rows generated by a
- SELECT statement.
- Therefore, the way to turn DBROWCOUNT
- .I off
- is to set it
- .I on
- with a count of 0.
- .Pi DBBUFFER
- .Ih "DBBUFFER option"
- .Ih "row buffering"
- .Ih "buffering rows"
- This option allows the application to buffer result rows, so that it
- can access them non-sequentially via the \f2dbgetrow()\f1 function.
- This option is handled locally by \*L and is not
- a \*S option. When the option is set, you supply a parameter which
- is the number of rows you want buffered.
- If you use 0
- as the number of rows to buffer,
- the buffer will be set to a default size (currently 1000).
- .sp 0.5v
- Row buffering provides a way to keep a specified number of \*S result rows in program memory.
- Without row buffering, the result row generated by each new \f2dbnextrow()\f1 call overwrites the contents
- of the previous result row.
- Row buffering is therefore useful for programs that need to look at result rows
- in a non-sequential manner.
- It does, however, carry a memory and performance penalty because each row in the buffer
- must be allocated and freed individually.
- Therefore, use it only if you need to.
- Specifically, the application should only turn the DBBUFFER option on if it calls \f2dbgetrow()\f1.
- Note that row buffering has nothing to do with network buffering and is a completely independent issue.
- (See
- .I "dbgetrow(), dbnextrow(),"
- and
- .I "dbclrbuf()"
- for more information about row buffering.)
- .Pi DBNOAUTOFREE
- .Ih "DBNOAUTOFREE option"
- .Ih dbfreebuf
- .Ih "command buffer, clearing"
- This option causes the command buffer to be cleared only by an
- explicit call to \f2dbfreebuf()\f1.
- When DBNOAUTOFREE is \f2not\f1 set,
- after a call to \f2dbsqlexec()\f1 or \f2dbsqlsend()\f1
- the first call to either \f2dbcmd()\f1 or \f2dbfcmd()\f1
- automatically clears the command buffer before the new text is entered.
- .mc |
- .Pi DBTEXTLIMIT
- .Ih "DBTEXTLIMIT option"
- .Ih "text values, limiting the size of"
- .Ih "image values, limiting the size of"
- This option causes \*L to limit the size of returned text
- or image values.
- When setting this option, you supply a parameter which is the
- length, in bytes, of the longest text or image value that your
- program can handle.
- \*L will read but ignore any part of a text or image
- value that goes over this limit.
- In the case of huge text values, it may take some time for
- the entire text value to be returned over the network.
- To keep \*S from sending this extra text in the first place,
- use the DBTEXTSIZE option instead.
- .mc
- .Kg
- .in -.375i
- .mc |
- .Bl
- DBBUFFER, DBNOAUTOFREE, and DBTEXTLIMIT are \*L options.
- That is, they affect \*L but are not sent to the \*S.
- The other options are \*S options\(emthey get sent to the \*S.
- \*S options are also settable through \*N.
- .Bl
- As mentioned in the preceding descriptions, certain
- options take parameters:
- .nf
- .sp
- .ne 10
- .in +3n
- .ta +21n
- \f3Option Possible parameter values\f1
- .sp 0.5v
- DBTEXTSIZE ``0'' to ``2,147,483,647''
- .sp .1v
- DBOFFSET ``select'', ``from'', ``table'', ``order'', ``compute'', ``statement'',
- \0\0``procedure'', ``execute'', or ``param''
- .sp .1v
- DBSTAT ``io'' or ``time''
- .sp .1v
- DBROWCOUNT ``0'' to ``2,147,483,647''
- .sp .1v
- DBBUFFER ``0'' to either ``32,767'' or ``2,147,483,647'', depending on whether
- \0\0your \f2int\f1 datatype is 2 or 4 bytes long
- .sp .1v
- DBTEXTLIMIT ``0'' to ``2,147,483,647''
- .in -3n
- .sp
- .fi
- \f2dbsetopt()\f1 requires that an option
- parameter be specified when setting any option on the preceding list.
- \f2dbclropt()\f1 and \f2dbisopt()\f1 require that the parameter be specified only for
- DBOFFSET and DBSTAT. This is because DBOFFSET and DBSTAT
- are the only options that can have multiple settings at a time, and thus they require further
- definition before being cleared or checked.
- .sp 0.5v
- Note that parameters specified in calls to \f2dbsetopt()\f1, \f2dbclropt()\f1, and
- \f2dbisopt()\f1 are always passed as character strings and must be quoted,
- even if they are numeric values.
- See the \f2dbsetopt()\f1 manual page for more information.
- .Bz
- .mc
- .Sa
- dbclropt,
- dbisopt,
- dbsetopt
-